<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="author" content="lzy">
    <title>lzy-</title>
    <script src="jquery-3.1.1.js"></script>
    <style>
        span{
            display: inline-block;
            width: 80px;
            height: 40px;
            border-radius: 10px;
            text-align: center;
            line-height: 40px;
            border: 1px solid gray;
            margin: 20px;
            cursor: pointer;
        }
        .on{
            border-color: red;
        }
    </style>
</head>
<body>
    <span>1</span>
    <span>2</span>
    <span>3</span>
</body>
</html>
<script>
    $('span').click(function(){
        $(this).toggleClass('on');
        $(this).siblings().removeClass('on');
    });

</script>